package main

import "fmt"

/*
* Author: JacksonCoder
* CreateTime: 2025/5/20
 */

type SkillsService interface {
	Running1()
	GetName1() string
}

type Student1 struct {
	Name string
	Age  int
}

type Teacher1 struct {
	Name   string
	Salary int
}

func (p Student1) GetName1() string {
	fmt.Println(p.Name)
	return p.Name
}

func (p Student1) Running1() { // 实现 Running方法
	fmt.Printf("%s running", p.Name)
}

func (p Teacher1) GetName1() string { //实现Getname方法
	fmt.Println(p.Name)
	return p.Name
}

func (p Teacher1) Running1() { // 实现 Running方法
	fmt.Printf("\n%s running", p.Name)
}

func main(){
	var skill SkillsService
	var stu Student1
	var t1 Teacher1
	t1.Name = "king"
	stu.Name = "alen"
	stu.Age = 22
	skill = stu
	skill.Running1()
	skill = t1
	t1.Running1()
}
